package services

import (
	"k8sdev/pkg/client"
	"log"

	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

func GetGVR() (apiResourceList []*metav1.APIResourceList, err error) {
	err = client.NewClient()
	if err != nil {
		log.Panic(err.Error())
		return
	}
	client := client.GetDiscoveryClient()

	apiResourceList, err = client.ServerResources()
	if err != nil {
		log.Fatal(err.Error())
		return
	}

	return
}
